package com.hulk.dryad.persistence.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author hulk
 * @since 2020-09-29
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ToString(callSuper = true)
@TableName("t_customer_login_info")
public class CustomerLoginInfo extends SuperEntity<CustomerLoginInfo> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * uuid
     */
    @TableField("login_no")
    private String loginNo;

    /**
     *  PWD-账号密码登录
        SMS-验证码登录
        EMAIL-邮箱
        QQ-QQ社交登录
        WECHAT-微信社交登录
        ALIPAY-支付宝社交登陆
        WEIBO-新浪微博社交登陆
     */

    @TableField("login_type")
    private String loginType;

    @TableField("operator_no")
    private String operatorNo;

    /**
     * 修改时，备份之前的登录号
     */
    @TableField("ori_login_no")
    private String oriLoginNo;

    /**
     * NORMAL-正常
        FREEZE-冻结
        LOCK-锁定
        FORBIDDEN-禁止登陆
        INACTIVE-未激活
     */
    @TableField("login_status")
    private String loginStatus;

    @TableField("active_code")
    private String activeCode;

    /**
     * WEB-网站用户注册
        APP-App用户注册
        OTHER-其他渠道
     */
    @TableField("login_sign_channel")
    private String loginSignChannel;

    @TableField("access_token")
    private String accessToken;

    @TableField("expire_in")
    private Integer expireIn;

    @TableField("refresh_token")
    private String refreshToken;

    @TableField("open_id")
    private String openId;

    @TableField("uid")
    private String uid;

    @TableField("code")
    private String code;

    @TableField("access_code")
    private String accessCode;

    @TableField("union_id")
    private String unionId;

    @TableField("scope")
    private String scope;

    @TableField("token_type")
    private String tokenType;

    @TableField("id_token")
    private String idToken;

    @TableField("mac_algorithm")
    private String macAlgorithm;

    @TableField("mac_key")
    private String macKey;

    @TableField("oauth_token")
    private String oauthToken;

    @TableField("oauth_token_secret")
    private String oauthTokenSecret;

    /**
     * 备注
     */
    @TableField("remark")
    private String remark;

    @TableField(value = "created_by", fill = FieldFill.INSERT)
    private String createdBy;

	@TableField(value = "updated_by", fill = FieldFill.INSERT_UPDATE)
	private String updatedBy;

	@TableField(value = "created_time", fill = FieldFill.INSERT)
	private LocalDateTime createdTime;

	@TableField(value = "updated_time", fill = FieldFill.INSERT_UPDATE)
	private LocalDateTime updatedTime;

    @TableField("archived_time")
    private LocalDateTime archivedTime;

	@TableField("archived_by")
    private String archivedBy;

    /**
     * 0-未归档
	 * 1-已归档
	 * (注销账户)
     */
    @TableLogic
    @TableField("archived_flag")
    private String archivedFlag;



    @TableField("ori_id")
    private String oriId;

    @TableField("rsv1")
    private String rsv1;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
